home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
watch.h.z
/
watch.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
2KB
|
70 lines
/**************************************************************************
* *
* Copyright (C) 1990, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#ifndef __SYS_WATCH_H__
#define __SYS_WATCH_H__
#ident "$Revision: 1.3 $"
/*
* a watchpoint struct - per watchpoint
*/
typedef struct watch_s {
caddr_t w_vaddr; /* start addr of watch point */
ulong w_length; /* length in bytes */
ulong w_mode; /* Read/Write/Execute */
struct watch_s *w_next; /* link */
} watch_t;
#define W_READ 0x1
#define W_WRITE 0x2
#define W_EXEC 0x4
/* struct per process that has watchpoints */
typedef struct pwatch_s {
watch_t *pw_list;
uint pw_flag;
caddr_t pw_skipaddr;
caddr_t pw_skipaddr2;
caddr_t pw_skippc; /* pc at skipaddr */
watch_t pw_firstsys; /* first watchpoint hit in system */
ulong pw_curmode; /* info to /proc */
caddr_t pw_curaddr; /* info to /proc */
ulong pw_cursize; /* info to /proc */
} pwatch_t;
/* values for flag */
#define WSTEP 0x00000001 /* stepping over a watchpoint */
#define WINSYS 0x00000002 /* got watchpoint inside system space */
#define WSETSTEP 0x00000004 /* watchpoint code set the single step */
#define WINTSYS 0x00000008 /* interested system watchpoint */
#define WIGN 0x00000010 /* skip this one no matter what */
#ifdef _KERNEL
extern int maxwatchpoints; /* max watchpoints per process */
void deleteallwatch(proc_t *p);
int getwatch(proc_t *, caddr_t (*)(caddr_t, ulong, ulong, caddr_t), caddr_t);
int deletewatch(proc_t *p, caddr_t vaddr);
int clrwatch(proc_t *p, watch_t *w);
int chkwatch(proc_t *p, caddr_t vaddr, uint *ep, ulong rw);
int skipwatch(proc_t *p, caddr_t vaddr, uint *ep, ulong rw, pde_t *);
void checkwatchstep(proc_t *p, uint *ep);
int stepoverwatch(proc_t *p);
int addwatch(proc_t *p, caddr_t vaddr, ulong size, ulong mode);
int setwatch(proc_t *p, watch_t *w);
int clrsyswatch(proc_t *p);
void cancelskipwatch(proc_t *p);
#endif /* _KERNEL */
#endif /* __SYS_WATCH_H__ */